package mp1.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import mp1.entity.Product;
import mp1.entity.Supplier;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SupplierMapper extends BaseMapper<Supplier> {
    @Select("SELECT * FROM supplier WHERE id IN(SELECT id  FROM product_supplier WHERE product_id IN(SELECT id FROM product WHERE name=#{proName}))")
    List<Supplier> findProByPro(String proName);
}
